package com.aptech.domain.JPA;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Category entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "CATEGORY", schema = "dbo", catalog = "Blue_Pumpkin")
public class Category implements java.io.Serializable {

	// Fields

	private Integer categoryId;
	private String categoryTitle;
	private Integer categoryOrder;
	private Integer topicCount;
	private Set<Faq> faqs = new HashSet<Faq>(0);

	// Constructors

	/** default constructor */
	public Category() {
	}

	/** minimal constructor */
	public Category(Integer categoryId) {
		this.categoryId = categoryId;
	}

	/** full constructor */
	public Category(Integer categoryId, String categoryTitle,
			Integer categoryOrder, Integer topicCount, Set<Faq> faqs) {
		this.categoryId = categoryId;
		this.categoryTitle = categoryTitle;
		this.categoryOrder = categoryOrder;
		this.topicCount = topicCount;
		this.faqs = faqs;
	}

	// Property accessors
	@Id
	@Column(name = "CATEGORY_ID", unique = true, nullable = false)
	public Integer getCategoryId() {
		return this.categoryId;
	}

	public void setCategoryId(Integer categoryId) {
		this.categoryId = categoryId;
	}

	@Column(name = "CATEGORY_TITLE", length = 5000)
	public String getCategoryTitle() {
		return this.categoryTitle;
	}

	public void setCategoryTitle(String categoryTitle) {
		this.categoryTitle = categoryTitle;
	}

	@Column(name = "CATEGORY_ORDER")
	public Integer getCategoryOrder() {
		return this.categoryOrder;
	}

	public void setCategoryOrder(Integer categoryOrder) {
		this.categoryOrder = categoryOrder;
	}

	@Column(name = "TOPIC_COUNT")
	public Integer getTopicCount() {
		return this.topicCount;
	}

	public void setTopicCount(Integer topicCount) {
		this.topicCount = topicCount;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "category")
	public Set<Faq> getFaqs() {
		return this.faqs;
	}

	public void setFaqs(Set<Faq> faqs) {
		this.faqs = faqs;
	}

}